home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-03-06 | 2.1 KB | 56 lines | [TEXT/GEOL] |
- Item 5339515 20-Sept-90 18:21PDT
-
- From: MM.XOBJ MacroMind, XObject Support,PRT
-
- To: TIM.SWIHART Swihart, Tim
- CPLUS.DEV$ C++ Interest List--Developers
- CPLUS.APPLE$ C++ Interest List--Apple Employees
-
- Sub: C++ bug,missing feature, or ?
-
- Is this a Bug, Missing Feature, or misunderstanding?
-
- Could you help me decode the true meaning of this message:
-
- File "Derived.h"; line 18 # sorry, not implemented: public specification
- of overloaded Base::Base()
-
- Is MPW C++ telling me that it falls short of 2.0 C++ in respect to member
- access modifiers? Is this just a problem with respect to modifying access to
- overloaded members? (Which Ellis and Stroustrup, page 246, say is dandy.)
-
- In my case I am using a
-
- class Derived : private Base { .... };
-
- The derived class "Derived" is privately derived from "Base" so that it may put
- some constraints on Derived, ensuring that it cannot be operated at too low a
- level by clients of Derived. (Many individual Base operations would violate
- class invariants for class Derived).
-
- Is this a bug? If so, is it expected to be fixed in MPW C++ 3.1 Final? And is
- there a workaround of some kind?
-
- By the way, I resorted to access modifiers in the first place, in an attempt to
- fix a different problem. I could not construct a Derived object, because the
- compiler complained:
-
- File "DerivedTest.cp"; line 175 # error: main() cannot access __nw : Base
- is a private base class
-
-
- Please respond with an explanation of why this is a problem, and what I can do
- (if there is anything short of public derivation). Should I stick with
- totally private derivation, and use my Derived class constructor to *MANUALLY*
- call the constructor of the base class? (And wouldn't that break if the class
- was switched to be publicly derived in the future? It is important not to
- redundantly construct the object, since it involves subordinate memory
- allocations.)
-
- ANy help or insights appreciated,
-
- Haim Zamir
- MacroMind, Inc.
- AppleLink MM.XOBJ
-
-